home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / c-runtime / include / RCS / objc.h,v < prev    next >
Encoding:
Text File  |  1992-04-13  |  33.8 KB  |  1,027 lines

  1. head    0.11;
  2. access;
  3. symbols;
  4. locks
  5.     dennisg:0.11; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 0.11
  10. date    92.04.13.11.40.53;    author dennisg;    state Exp;
  11. branches;
  12. next    0.10;
  13.  
  14. 0.10
  15. date    91.12.31.20.16.08;    author dennisg;    state Exp;
  16. branches;
  17. next    0.9;
  18.  
  19. 0.9
  20. date    91.12.10.12.04.22;    author dennisg;    state Exp;
  21. branches;
  22. next    0.8;
  23.  
  24. 0.8
  25. date    91.12.01.01.29.29;    author dennisg;    state Exp;
  26. branches;
  27. next    0.7;
  28.  
  29. 0.7
  30. date    91.11.29.22.00.10;    author dennisg;    state Exp;
  31. branches;
  32. next    0.6;
  33.  
  34. 0.6
  35. date    91.11.29.20.02.01;    author dennisg;    state Exp;
  36. branches;
  37. next    0.5;
  38.  
  39. 0.5
  40. date    91.11.29.00.24.14;    author dennisg;    state Exp;
  41. branches;
  42. next    0.4;
  43.  
  44. 0.4
  45. date    91.11.19.12.37.49;    author dennisg;    state Exp;
  46. branches;
  47. next    0.3;
  48.  
  49. 0.3
  50. date    91.11.16.15.57.35;    author dennisg;    state Exp;
  51. branches;
  52. next    0.2;
  53.  
  54. 0.2
  55. date    91.11.07.22.31.42;    author dennisg;    state Exp;
  56. branches;
  57. next    0.1;
  58.  
  59. 0.1
  60. date    91.10.24.00.19.24;    author dennisg;    state Exp;
  61. branches;
  62. next    ;
  63.  
  64.  
  65. desc
  66. @This file contains declarations used within the Objective-C
  67. run-time system of interest to users.
  68. @
  69.  
  70.  
  71. 0.11
  72. log
  73. @Check in after array version of run-time works.
  74. Expect more changes as hash version and other changes are made.
  75. @
  76. text
  77. @/* -*-c-*-
  78.  * This file contains declarations used by the run-time system.
  79.  *
  80.  *  Most of these declarations are defined by virtue of data 
  81.  *  structures produced by the compiler.
  82.  *
  83.  * Copyright (C) 1991 Threaded Technologies Inc.
  84.  * 
  85.  * This program is free software; you can redistribute it and/or modify
  86.  * it under the terms of the GNU General Public License as published
  87.  * by the Free Software Foundation; either version 1, or any later version.
  88.  * 
  89.  * This program is distributed in the hope that it will be useful,
  90.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  91.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  92.  * General Public License for more details.
  93.  * 
  94.  * You should receive a copy of the GNU General Public License 
  95.  * along with this program; if not, write to the Free Software
  96.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  97.  * 
  98.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.10 1991/12/31 20:16:08 dennisg Exp dennisg $
  99.   $Author: dennisg $
  100.   $Date: 1991/12/31 20:16:08 $
  101.   $Log: ObjC.h,v $
  102.  * Revision 0.10  1991/12/31  20:16:08  dennisg
  103.  * Deleted index variable stuff.  Index variables are a hack to the language.
  104.  * Cleaned up some documentation.
  105.  *
  106.  * Revision 0.9  1991/12/10  12:04:22  dennisg
  107.  * Cleaned up file format for a distribution.
  108.  *
  109.  * Revision 0.8  1991/12/01  01:29:29  dennisg
  110.  * modified to remove changes previously made to
  111.  * implement posing.  posing just got easy.
  112.  *
  113.  * Revision 0.7  1991/11/29  22:00:10  dennisg
  114.  * modified to implement set functions.
  115.  *
  116.  * Revision 0.6  1991/11/29  20:02:01  dennisg
  117.  * fixed several const decls.  bozo.
  118.  *
  119.  * Revision 0.5  1991/11/29  00:24:14  dennisg
  120.  * many changes including posing, things to make the compiler
  121.  * happier, structure changes, and things to make it play better.
  122.  *
  123.  * Revision 0.4  1991/11/19  12:37:49  dennisg
  124.  * changed typedef and struct decls.
  125.  * the run-time was changed and those decls changed too.
  126.  *
  127.  * Revision 0.3  1991/11/16  15:57:35  dennisg
  128.  * changed the defs for class structures for new implementation of run-time.
  129.  * changed def of SEL back to its original type.
  130.  *
  131.  * Revision 0.2  1991/11/07  22:31:42  dennisg
  132.  * added copyleft.
  133.  *
  134.  * Revision 0.1  1991/10/24  00:19:24  dennisg
  135.  * Initial check in.  Preliminary development stage.
  136.  *
  137. */
  138.  
  139.  
  140. #ifndef _objc_INCLUDE_GNU
  141. #define _objc_INCLUDE_GNU
  142.  
  143.                                                 /* If someone is using a c++
  144.                                                   compiler then adjust the 
  145.                                                   types in the file back 
  146.                                                   to C. */
  147. #ifdef __cplusplus
  148. extern "C" {
  149. #endif
  150.  
  151. #include  <sys/types.h>
  152. #include  <record-inline.h>
  153. #include  <stdarg.h>
  154.  
  155.  
  156. #define nil (id)0                               /* id of Nil instance */
  157. #define Nil (Class_t)0                          /* id of Nil class */
  158. typedef char* STR;                              /* String alias */
  159.  
  160.                                                 /* Boolean typedefs */
  161. typedef char  BOOL;
  162. #define YES   (BOOL)1
  163. #define NO    (BOOL)0
  164.  
  165.                                                 /* Definition of a 
  166.                                                   selector.  Selectors are 
  167.                                                   really of type char*. The
  168.                                                   run-time hashes the 
  169.                                                   string's address to locate
  170.                                                   the method.  If the method
  171.                                                   isn't in the hash table then
  172.                                                   a search is made through the 
  173.                                                   class hierarchy using 
  174.                                                   strcmp() to locate the
  175.                                                   method. */
  176. #if 0
  177. typedef struct objc_selector*   SEL;
  178. #else
  179. typedef void* SEL;
  180. #endif
  181.  
  182.                                                 /* ObjC uses this typedef 
  183.                                                   for untyped instances. */
  184. typedef struct objc_object {
  185.   struct objc_class*  isa;
  186. } *id;
  187.  
  188.                                                 /* Prototype for method 
  189.                                                   functions. */
  190. typedef id  ( *IMP )( id, SEL, ... ); 
  191.  
  192.                                                 /* Filer types used to 
  193.                                                   describe Ivars and 
  194.                                                   Methods. */
  195. #define _C_ID       '@@'
  196. #define _C_CLASS    '#'
  197. #define _C_SEL      ':'
  198. #define _C_CHR      'c'
  199. #define _C_UCHR     'C'
  200. #define _C_SHT      's'
  201. #define _C_USHT     'S'
  202. #define _C_INT      'i'
  203. #define _C_UINT     'I'
  204. #define _C_LNG      'l'
  205. #define _C_ULNG     'L'
  206. #define _C_FLT      'f'
  207. #define _C_DBL      'd'
  208. #define _C_BFLD     'b'
  209. #define _C_VOID     'v'
  210. #define _C_UNDEF    '?'
  211. #define _C_PTR      '^'
  212. #define _C_CHARPTR  '*'
  213. #define _C_ARY_B    '['
  214. #define _C_ARY_E    ']'
  215. #define _C_UNION_B  '('
  216. #define _C_UNION_E  ')'
  217. #define _C_STRUCT_B '{'
  218. #define _C_STRUCT_E '}'
  219.  
  220. /*
  221.  * These definitions are masks used with the "info" member variable in the
  222.  * class and meta class structures. 
  223.  */
  224. #define CLS_CLASS         0x1L                  /* The structure is of type
  225.                                                   class (Class_t). */
  226. #define CLS_META          0x2L                  /* The structure is of type
  227.                                                   meta class (MetaClass_t). */
  228. #define CLS_INITIALIZED   0x4L                  /* Class is initialized. A
  229.                                                   +initialize method is the
  230.                                                   first message sent to a
  231.                                                   class.  It isn't guaranteed
  232.                                                   to be sent only once. */
  233.  
  234.  
  235.                                                 /* Set this variable to !0 to
  236.                                                   have the messager print
  237.                                                   messaging operations. */
  238.   extern BOOL objc_trace;
  239.  
  240.  
  241. /*
  242.  * Whereas a Module (defined further down) is the root (typically) of a file,
  243.  * a Symtab is the root of the class and category definitions within the
  244.  * module.  
  245.  *
  246.  * A Symtab contains a variable length array of pointers to classes and
  247.  * categories  defined in the module. 
  248.  */
  249. typedef struct objc_symtab {
  250.   u_long    sel_ref_cnt;                        /* Unknown. */
  251.   SEL       *refs;                              /* Unknown. */
  252.   u_short   cls_def_cnt;                        /* Number of classes compiled
  253.                                                   (defined) in the module. */
  254.   u_short   cat_def_cnt;                        /* Number of categories 
  255.                                                   compiled (defined) in the 
  256.                                                   module. */
  257.   void      *defs[1];                           /* Variable array of pointers.
  258.                                                   cls_def_cnt of type Class_t 
  259.                                                   followed by cat_def_cnt of
  260.                                                   type Category_t. */
  261. } Symtab,   *Symtab_t;
  262.  
  263.  
  264. /*
  265.  * The compiler generates one of these structures for each module that
  266.  * composes the executable (eg main.m).  
  267.  *
  268.  * This data structure is the root of the definition tree for the module.  
  269.  *
  270.  * A collect program runs between ld stages and creates a ObjC ctor array. 
  271.  * That array holds a pointer to each module structure of the executable. 
  272.  */
  273. typedef struct objc_module {
  274.   u_long      version;                          /* Compiler revision. */
  275.   u_long      size;                             /* sizeof(Module). */
  276.   const char* name;                             /* Name of the file where the 
  277.                                                   module was generated.   The 
  278.                                                   name includes the path. */
  279.   Symtab_t    symtab;                           /* Pointer to the Symtab of
  280.                                                   the module.  The Symtab
  281.                                                   holds an array of pointers to 
  282.                                                   the classes and categories 
  283.                                                   defined in the module. */
  284. } Module, *Module_t;
  285.  
  286.  
  287. /*
  288.  * The compiler generates one of these structures for a class that has
  289.  * instance variables defined in its specification. 
  290.  */
  291. typedef struct objc_ivar* Ivar_t;
  292. typedef struct objc_ivar_list {
  293.   int   ivar_count;                             /* Number of structures (Ivar) 
  294.                                                   contained in the list.  One
  295.                                                   structure per instance 
  296.                                                   variable defined in the
  297.                                                   class. */
  298.   struct objc_ivar {
  299.     const char* ivar_name;                      /* Name of the instance
  300.                                                   variable as entered in the
  301.                                                   class definition. */
  302.     const char* ivar_type;                      /* Description of the Ivar's
  303.                                                   type.  Useful for 
  304.                                                   debuggers. */
  305.     int         ivar_offset;                    /* Byte offset from the base 
  306.                                                   address of the instance 
  307.                                                   structure to the variable. */
  308.  
  309.   } ivar_list[1];                               /* Variable length 
  310.                                                   structure. */
  311. } IvarList, *IvarList_t;
  312.  
  313.  
  314. /*
  315.  * The compiler generates one (or more) of these structures for a class that
  316.  * has methods defined in its specification. 
  317.  *
  318.  * The implementation of a class can be broken into separate pieces in a file
  319.  * and categories can break them across modules. To handle this problem is a
  320.  * singly linked list of methods. 
  321.  */
  322. typedef struct objc_method Method;
  323. typedef Method* Method_t;
  324. typedef struct objc_method_list {
  325.   struct objc_method_list*  method_next;      /* This variable is used to link 
  326.                                                 a method list to another.  It 
  327.                                                 is a singly linked list. */
  328.   int             method_count;               /* Number of methods defined in 
  329.                                                 this structure. */
  330.   struct objc_method {
  331.     SEL         method_name;                  /* This variable is the method's 
  332.                                                 name.  It is a char*. 
  333.                                                   The unique integer passed to 
  334.                                                 objc_msgSend() is a char* too.  
  335.                                                 It is compared against 
  336.                                                 method_name using strcmp(). */
  337.     const char* method_types;                 /* Description of the method's
  338.                                                 parameter list.  Useful for
  339.                                                 debuggers. */
  340.     IMP         method_imp;                   /* Address of the method in the 
  341.                                                 executable. */
  342.   } method_list[1];                           /* Variable length 
  343.                                                 structure. */
  344. } MethodList, *MethodList_t;
  345.  
  346.  
  347. /*
  348.  * The compiler generates one of these structures for each class.  
  349.  *
  350.  * This structure is the definition for meta classes. By definition a meta
  351.  * class is the class's class.  Its most relevant contribution is that its
  352.  * method list contain the class's factory methods. 
  353.  *
  354.  * This structure is generated by the compiler in the executable and used by
  355.  * the run-time during normal messaging operations.  Therefore some members
  356.  * change type. The compiler generates "char* const" and places a string in
  357.  * the following member variables:  isa and super_class. 
  358.  */
  359. typedef struct objc_metaClass {     
  360.   struct objc_metaClass*  isa;                /* Pointer to Object meta
  361.                                                 class. */
  362.   struct objc_metaClass*  super_class;        /* Pointer to meta class's
  363.                                                 super class. NULL for 
  364.                                                 Object. */
  365.   const char*             name;               /* Name of the meta class. */
  366.   long                    version;            /* Unknown. */
  367.   long                    info;               /* Bit mask.  See class masks 
  368.                                                 defined above. */
  369.   long                    instance_size;      /* Always 0 except for Object.
  370.                                                 Should be ignored. */
  371.   IvarList_t              ivars;              /* Always NULL except for 
  372.                                                 Object.  Should be ignored. */
  373.   MethodList_t            methods;            /* Linked List of factory methods 
  374.                                                 for the class. */
  375.   Record_t*               cache;              /* Pointer to factory method
  376.                                                                                                 dispatch table. */
  377. } MetaClass, *MetaClass_t;
  378.  
  379.  
  380. /*
  381.  * The compiler generates one of these structures for each class.  
  382.  *
  383.  * This structure is the definition for classes. 
  384.  *
  385.  * This structure is generated by the compiler in the executable and used by
  386.  * the run-time during normal messaging operations.  Therefore some members
  387.  * change type. The compiler generates "char* const" and places a string in
  388.  * the following member variables:  super_class. 
  389.  */
  390. typedef struct objc_class {     
  391.   MetaClass_t         isa;                    /* Pointer to the class's
  392.                                                 meta class. */
  393.   struct objc_class*  super_class;            /* Pointer to the super 
  394.                                                 class. NULL for class 
  395.                                                 Object. */
  396.   const char*         name;                   /* Name of the class. */
  397.   long                version;                /* Unknown. */
  398.   long                info;                   /* Bit mask.  See class masks 
  399.                                                 defined above. */
  400.   long                instance_size;          /* Size in bytes of the class.  
  401.                                                 The sum of the class definition 
  402.                                                 and all super class 
  403.                                                 definitions. */
  404.   IvarList_t          ivars;                  /* Pointer to a structure that
  405.                                                 describes the instance 
  406.                                                 variables in the class
  407.                                                 definition.  NULL indicates
  408.                                                 no instance variables.  Does
  409.                                                 not include super class
  410.                                                 variables. */
  411.   MethodList_t        methods;                /* Linked list of instance
  412.                                                 methods defined for the 
  413.                                                 class. */
  414.   Record_t*           cache;                  /* Pointer to instance method 
  415.                                                                                                 dispatch table. */
  416. } Class, *Class_t;
  417.  
  418.  
  419. /*
  420.  * The compiler generates one of these structures for each category.  A class
  421.  * may have many categories and contain both instance and factory methods.  
  422.  */
  423. typedef struct objc_category {
  424.   const char*   category_name;                /* Name of the category.  Name
  425.                                                 contained in the () of the
  426.                                                 category definition. */
  427.   const char*   class_name;                   /* Name of the class to which
  428.                                                 the category belongs. */
  429.   MethodList_t  instance_methods;             /* Linked list of instance
  430.                                                 methods defined in the 
  431.                                                 category. NULL indicates no
  432.                                                 instance methods defined. */
  433.   MethodList_t  class_methods;                /* Linked list of factory 
  434.                                                 methods defined in the
  435.                                                 category.  NULL indicates no
  436.                                                 class methods defined. */
  437. } Category, *Category_t;
  438.  
  439.  
  440. /*
  441.  * Structure used when a message is send to a class's super class.  The
  442.  * compiler generates one of these structures and passes it to
  443.  * objc_msgSuper(). 
  444.  */
  445. typedef struct objc_super {
  446.   id      receiver;                           /* Id of the object sending
  447.                                                 the message. */
  448.   Class_t class;                              /* Object's super class. */
  449. } Super, *Super_t;
  450.  
  451. /*
  452.  * _alloc points to the function, called through class_createInstance(), used
  453.  * to allocate memory for new instances. 
  454.  */
  455. extern id (*_alloc)(Class_t aClass);
  456. /*
  457.  * _dealloc points to the function, called through object_dispose(), used to
  458.  * free instances. 
  459.  */
  460. extern id (*_dealloc)(id aObject);
  461. /*
  462.  * _realloc points to the function, called through object_realloc(), used to
  463.  * reallocate memory for an object 
  464.  */
  465. extern id (*_realloc)(id aObject, u_int newSize);
  466.  
  467. /*
  468.  * _copy points to the function, called through object_copy(), used to create
  469.  * an exact copy of an object. 
  470.  */
  471. extern  id (*_copy)(id aObject);
  472.  
  473. /*
  474.  * _error points to the function that the run-time system calls in response
  475.  * to an error.  By default, it prints formatted error messages to the
  476.  * standard error stream and calls abort() to produce a core file. 
  477.  */
  478. extern void (*_error)(id aObject, const char* fmt, va_list ap);
  479.  
  480.  
  481. #ifdef __cplusplus
  482. }
  483. #endif
  484.  
  485.  
  486. #endif
  487. @
  488.  
  489.  
  490. 0.10
  491. log
  492. @Deleted index variable stuff.  Index variables are a hack to the language.
  493. Cleaned up some documentation.
  494. @
  495. text
  496. @d22 1
  497. a22 1
  498.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.9 1991/12/10 12:04:22 dennisg Exp dennisg $
  499. d24 1
  500. a24 1
  501.   $Date: 1991/12/10 12:04:22 $
  502. d26 4
  503. d76 1
  504. a76 1
  505. #include  <hash.h>
  506. d80 2
  507. a81 2
  508. #define nil ( id )0                             /* id of Nil instance */
  509. #define Nil ( Class_t )0                        /* id of Nil class */
  510. d299 2
  511. a300 5
  512.   Cache_t                 cache;              /* Used to cache factory methods
  513.                                                 defined for the class and its 
  514.                                                 super classes.  Entries are
  515.                                                 made to the cache as the
  516.                                                 messager receives them. */
  517. d338 2
  518. a339 5
  519.   Cache_t             cache;                  /* Used to cache instance methods
  520.                                                 defined for the class and its 
  521.                                                 super classes.  Entries are
  522.                                                 made to the cache as the
  523.                                                 messager receives them. */
  524. @
  525.  
  526.  
  527. 0.9
  528. log
  529. @Cleaned up file format for a distribution.
  530. @
  531. text
  532. @d22 1
  533. a22 1
  534.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.8 1991/12/01 01:29:29 dennisg Exp dennisg $
  535. d24 1
  536. a24 1
  537.   $Date: 1991/12/01 01:29:29 $
  538. d26 3
  539. d140 3
  540. a142 4
  541. /* 
  542.  * These definitions are masks used with 
  543.  *  the "info" member variable in the class and 
  544.  *  meta class structures. 
  545. d161 4
  546. a164 4
  547. /* 
  548.  * Whereas a Module (defined further down) is the 
  549.  *  root (typically) of a file, a Symtab is the root of the 
  550.  *  class and category definitions within the module.  
  551. d166 2
  552. a167 2
  553.  * A Symtab contains a variable length array of pointers
  554.  *  to classes and categories  defined in the module. 
  555. d184 3
  556. a186 3
  557. /* 
  558.  * The compiler generates one of these structures for each
  559.  *  module that composes the executable (eg main.m).  
  560. d188 1
  561. a188 2
  562.  * This data structure is the root of the definition tree
  563.  *  for the module.  
  564. d190 2
  565. a191 3
  566.  * A collect program runs between ld stages and creates 
  567.  *  a ObjC ctor array.  That array holds a pointer to each
  568.  *  module structure of the executable. 
  569. d207 3
  570. a209 4
  571. /* 
  572.  * The compiler generates one of these structures for a 
  573.  *  class that has instance variables defined in its 
  574.  *  specification. 
  575. d234 3
  576. a236 3
  577. /* 
  578.  * The compiler generates one (or more) of these structures 
  579.  *  for a class that has methods defined in its specification. 
  580. d238 3
  581. a240 3
  582.  * The implementation of a class can be broken into separate 
  583.  *  pieces in a file and categories can break them across modules.
  584.  *  To handle this problem is a singly linked list of methods.
  585. d268 1
  586. a268 2
  587.  * The compiler generates one of these structures for 
  588.  *  each class.  
  589. d270 8
  590. a277 11
  591.  * This structure is the definition for meta classes.
  592.  *  By definition a meta class is the class's class.  Its 
  593.  *  most relevant contribution is that its method list
  594.  *  contain the class's factory methods.
  595.  *  
  596.  * This structure is generated by the compiler in the
  597.  *  executable and used by the run-time during normal
  598.  *  messaging operations.  Therefore some members 
  599.  *  change type.
  600.  * The compiler generates "char* const" and places a string
  601.  *  in the following member variables:  isa and super_class.
  602. d304 1
  603. a304 2
  604.  * The compiler generates one of these structures for 
  605.  *  each class.  
  606. d306 6
  607. a311 8
  608.  * This structure is the definition for classes.
  609.  *  
  610.  * This structure is generated by the compiler in the
  611.  *  executable and used by the run-time during normal
  612.  *  messaging operations.  Therefore some members 
  613.  *  change type.
  614.  * The compiler generates "char* const" and places a string
  615.  *  in the following member variables:  super_class.
  616. d346 2
  617. a347 4
  618.  * The compiler generates one of these structures 
  619.  *  for each category.  A class may have many 
  620.  *  categories and contain both instance and 
  621.  *  factory methods.  
  622. d366 4
  623. a369 4
  624. /* 
  625.  * Structure used when a message is send to a class's
  626.  *  super class.  The compiler generates one of these
  627.  *  structures and passes it to objc_msgSuper(). 
  628. d378 2
  629. a379 3
  630.  * _alloc points to the function, called through 
  631.  *  class_createInstance(), used to allocate memory for 
  632.  *  new instances.
  633. d381 1
  634. a381 1
  635. extern id (*_alloc)(Class_t aClass, u_int indexedIvarBytes);
  636. d383 2
  637. a384 2
  638.  * _dealloc points to the function, called 
  639.  *  through object_dispose(), used to free instances.
  640. d388 2
  641. a389 2
  642.  * _realloc points to the function, called through 
  643.  *  object_realloc(), used to reallocate memory for an object
  644. d391 1
  645. a391 1
  646. extern id (*_realloc)(id aObject, u_int numBytes);
  647. d394 2
  648. a395 2
  649.  * _copy points to the function, called through 
  650.  *  object_copy(), used to create an exact copy of an object.
  651. d397 1
  652. a397 1
  653. extern  id (*_copy)(id aObject, u_int indexedIvarBytes);
  654. d400 3
  655. a402 4
  656.  * _error points to the function that the run-time 
  657.  *  system calls in response to an error.  By default, 
  658.  *  it prints formatted error messages to the standard 
  659.  *  error stream and calls abort() to produce a core file.
  660. @
  661.  
  662.  
  663. 0.8
  664. log
  665. @modified to remove changes previously made to
  666. implement posing.  posing just got easy.
  667. @
  668. text
  669. @d22 1
  670. a22 1
  671.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.7 1991/11/29 22:00:10 dennisg Exp dennisg $
  672. d24 1
  673. a24 1
  674.   $Date: 1991/11/29 22:00:10 $
  675. d26 4
  676. d70 1
  677. a70 1
  678. #include    <stdarg.h>
  679. d194 3
  680. a196 3
  681.   u_long        version;                            /* Compiler revision. */
  682.   u_long        size;                                /* sizeof(Module). */
  683.   const char*    name;                               /* Name of the file where the 
  684. d199 1
  685. a199 1
  686.   Symtab_t      symtab;                              /* Pointer to the Symtab of
  687. d220 1
  688. a220 1
  689.     const char* ivar_name;                         /* Name of the instance
  690. d223 1
  691. a223 1
  692.     const char* ivar_type;                         /* Description of the Ivar's
  693. d226 1
  694. a226 1
  695.     int               ivar_offset;                      /* Byte offset from the base 
  696. d252 1
  697. a252 1
  698.     SEL               method_name;                    /* This variable is the method's 
  699. d258 1
  700. a258 1
  701.     const char*    method_types;                 /* Description of the method's
  702. d261 1
  703. a261 1
  704.     IMP               method_imp;                   /* Address of the method in the 
  705. d282 1
  706. a282 1
  707.  *    in the following member variables:  isa and super_class.
  708. d285 8
  709. a292 8
  710.   struct objc_metaClass*    isa;                /* Pointer to Object meta
  711.                                                                                                 class. */
  712.   struct objc_metaClass*    super_class;        /* Pointer to meta class's
  713.                                                                                                 super class. NULL for 
  714.                                                                                                 Object. */
  715.   const char*                 name;               /* Name of the meta class. */
  716.   long                                  version;            /* Unknown. */
  717.   long                              info;               /* Bit mask.  See class masks 
  718. d294 1
  719. a294 1
  720.   long                              instance_size;      /* Always 0 except for Object.
  721. d296 1
  722. a296 1
  723.   IvarList_t                        ivars;              /* Always NULL except for 
  724. d298 1
  725. a298 1
  726.   MethodList_t                          methods;            /* Linked List of factory methods 
  727. d300 1
  728. a300 1
  729.   Cache_t                           cache;              /* Used to cache factory methods
  730. d319 1
  731. a319 1
  732.  *    in the following member variables:  super_class.
  733. d322 1
  734. a322 1
  735.   MetaClass_t               isa;                    /* Pointer to the class's
  736. d324 3
  737. a326 3
  738.   struct objc_class*    super_class;            /* Pointer to the super 
  739.                                                                                                 class. NULL for class 
  740.                                                                                                 Object. */
  741. d328 2
  742. a329 2
  743.   long                      version;                /* Unknown. */
  744.   long                      info;                   /* Bit mask.  See class masks 
  745. d331 1
  746. a331 1
  747.   long                      instance_size;          /* Size in bytes of the class.  
  748. d335 1
  749. a335 1
  750.   IvarList_t                ivars;                  /* Pointer to a structure that
  751. d342 1
  752. a342 1
  753.   MethodList_t              methods;                /* Linked list of instance
  754. d345 1
  755. a345 1
  756.   Cache_t                      cache;                  /* Used to cache instance methods
  757. d382 1
  758. a382 1
  759.   id        receiver;                           /* Id of the object sending
  760. d389 2
  761. a390 2
  762.  *    class_createInstance(), used to allocate memory for 
  763.  *    new instances.
  764. d395 1
  765. a395 1
  766.  *    through object_dispose(), used to free instances.
  767. d400 1
  768. a400 1
  769.  *    object_realloc(), used to reallocate memory for an object
  770. d406 1
  771. a406 1
  772.  *    object_copy(), used to create an exact copy of an object.
  773. d408 1
  774. a408 1
  775. extern    id (*_copy)(id aObject, u_int indexedIvarBytes);
  776. d412 3
  777. a414 3
  778.  *    system calls in response to an error.  By default, 
  779.  *    it prints formatted error messages to the standard 
  780.  *    error stream and calls abort() to produce a core file.
  781. @
  782.  
  783.  
  784. 0.7
  785. log
  786. @modified to implement set functions.
  787. @
  788. text
  789. @d22 1
  790. a22 1
  791.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.6 1991/11/29 20:02:01 dennisg Exp dennisg $
  792. d24 1
  793. a24 1
  794.   $Date: 1991/11/29 20:02:01 $
  795. d26 3
  796. a146 3
  797. #define CLS_POSING        0x8L                  /* Class is posing as 
  798.                                                                                                     another. */
  799. #define CLS_MAPPED        0x10L                 /* Unknown. */
  800. @
  801.  
  802.  
  803. 0.6
  804. log
  805. @fixed several const decls.  bozo.
  806. @
  807. text
  808. @d22 1
  809. a22 1
  810.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.5 1991/11/29 00:24:14 dennisg Exp dennisg $
  811. d24 1
  812. a24 1
  813.   $Date: 1991/11/29 00:24:14 $
  814. d26 3
  815. d63 1
  816. d382 31
  817. @
  818.  
  819.  
  820. 0.5
  821. log
  822. @many changes including posing, things to make the compiler
  823. happier, structure changes, and things to make it play better.
  824. @
  825. text
  826. @d22 1
  827. a22 1
  828.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.4 1991/11/19 12:37:49 dennisg Exp dennisg $
  829. d24 1
  830. a24 1
  831.   $Date: 1991/11/19 12:37:49 $
  832. d26 4
  833. d186 3
  834. a188 3
  835.   u_long    version;                            /* Compiler revision. */
  836.   u_long    size;                               /* sizeof(Module). */
  837.   char*     name;                               /* Name of the file where the 
  838. d191 1
  839. a191 1
  840.   Symtab_t  symtab;                             /* Pointer to the Symtab of
  841. d212 1
  842. a212 1
  843.     char* ivar_name;                            /* Name of the instance
  844. d215 1
  845. a215 1
  846.     char* ivar_type;                            /* Description of the Ivar's
  847. d218 1
  848. a218 1
  849.     int   ivar_offset;                          /* Byte offset from the base 
  850. d244 1
  851. a244 1
  852.     SEL   method_name;                        /* This variable is the method's 
  853. d250 1
  854. a250 1
  855.     char* method_types;                       /* Description of the method's
  856. d253 1
  857. a253 1
  858.     IMP   method_imp;                         /* Address of the method in the 
  859. d282 1
  860. a282 1
  861.   char*                             name;               /* Name of the meta class. */
  862. d319 1
  863. a319 1
  864.   char*                     name;                   /* Name of the class. */
  865. d352 1
  866. a352 1
  867.   char*         category_name;                /* Name of the category.  Name
  868. d355 1
  869. a355 1
  870.   char*         class_name;                   /* Name of the class to which
  871. d383 1
  872. @
  873.  
  874.  
  875. 0.4
  876. log
  877. @changed typedef and struct decls.
  878. the run-time was changed and those decls changed too.
  879. @
  880. text
  881. @d22 1
  882. a22 1
  883.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.3 1991/11/16 15:57:35 dennisg Exp dennisg $
  884. d24 1
  885. a24 1
  886.   $Date: 1991/11/16 15:57:35 $
  887. d26 4
  888. d78 1
  889. d80 3
  890. @
  891.  
  892.  
  893. 0.3
  894. log
  895. @changed the defs for class structures for new implementation of run-time.
  896. changed def of SEL back to its original type.
  897. @
  898. text
  899. @d22 1
  900. a22 1
  901.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.2 1991/11/07 22:31:42 dennisg Exp dennisg $
  902. d24 1
  903. a24 1
  904.   $Date: 1991/11/07 22:31:42 $
  905. d26 4
  906. d128 2
  907. a129 3
  908. #define CLS_POSING        0x8L                  /* Class is posing as another.
  909.                                                   Used to fix broken 
  910.                                                   classes. */
  911. d268 2
  912. a269 1
  913.                                                                                                 super meta class. */
  914. d305 2
  915. a306 1
  916.                                                                                                 class. */
  917. d362 1
  918. a362 1
  919.   id    receiver;                             /* Id of the object sending
  920. d364 1
  921. a364 3
  922.   char* class;                                /* Name of the object's super
  923.                                                 class.  Passed to remove a 
  924.                                                 level of indirection? */
  925. @
  926.  
  927.  
  928. 0.2
  929. log
  930. @added copyleft.
  931. @
  932. text
  933. @d22 1
  934. a22 1
  935.   $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.1 1991/10/24 00:19:24 dennisg Exp dennisg $
  936. d24 1
  937. a24 1
  938.   $Date: 1991/10/24 00:19:24 $
  939. d26 3
  940. d59 1
  941. a59 1
  942.                                                 /* Defination of a 
  943. d62 9
  944. a70 3
  945.                                                   run-time uses strcmp() to
  946.                                                   locate selectors. */
  947. typedef STR   SEL;
  948. d80 1
  949. a80 5
  950. typedef id  ( *IMP )( 
  951. #ifdef __STDC__
  952.   id, SEL, ...
  953. #endif
  954. ); 
  955. d171 2
  956. a172 4
  957.   u_long    version;                            /* Unknown. */
  958.   u_long    size;                               /* Suspect this is 
  959.                                                   sizeof(Module).  It is always 
  960.                                                   16. */
  961. d256 4
  962. a259 2
  963.  *  messaging operations.  Therefore some definitions 
  964.  *  don't make sense in some contexts.
  965. d262 7
  966. a268 7
  967.   char*         isa;                          /* Always a pointer to the
  968.                                                 string "Object". */
  969.   char*         super_class;                  /* Name of the class's super
  970.                                                 class. */
  971.   char*         name;                         /* Name of the meta class. */
  972.   long          version;                      /* Unknown. */
  973.   long          info;                         /* Bit mask.  See class masks 
  974. d270 1
  975. a270 1
  976.   long          instance_size;                /* Always 0 except for Object.
  977. d272 1
  978. a272 1
  979.   IvarList_t    ivars;                        /* Always NULL except for 
  980. d274 1
  981. a274 1
  982.   MethodList_t  methods;                      /* Linked List of factory methods 
  983. d276 1
  984. a276 1
  985.   Cache_t       cache;                        /* Used to cache factory methods
  986. d292 4
  987. a295 2
  988.  *  messaging operations.  Therefore some definitions 
  989.  *  don't make sense in some contexts.
  990. d298 1
  991. a298 1
  992.   MetaClass_t   isa;                          /* Pointer to the class's
  993. d300 5
  994. a304 5
  995.   char*         super_class;                  /* Name of the class's super
  996.                                                 class. */
  997.   char*         name;                         /* Name of the class. */
  998.   long          version;                      /* Unknown. */
  999.   long          info;                         /* Bit mask.  See class masks 
  1000. d306 1
  1001. a306 1
  1002.   long          instance_size;                /* Size in bytes of the class.  
  1003. d310 1
  1004. a310 1
  1005.   IvarList_t    ivars;                        /* Pointer to a structure that
  1006. d317 1
  1007. a317 1
  1008.   MethodList_t  methods;                      /* Linked list of instance
  1009. d320 1
  1010. a320 1
  1011.   Cache_t       cache;                        /* Used to cache instance methods
  1012. @
  1013.  
  1014.  
  1015. 0.1
  1016. log
  1017. @Initial check in.  Preliminary development stage.
  1018. @
  1019. text
  1020. @d7 22
  1021. a28 4
  1022.   $Header$
  1023.   $Author$
  1024.   $Date$
  1025.   $Log$
  1026. @
  1027.